import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

//定义数据模块
export const useMenuStore = defineStore('menu', () => {
  
  //定义需要管理的数据
  const menuPath = ref([])

  //保存用户信息
  function save_menupath(u:any) {
    menuPath.value = u;
  }
  //删除用户信息
  function remove_menupath() {
    menuPath.value = [];
  }

  return { menuPath,save_menupath,remove_menupath }
  
}, { persist:true })
